import Vue from 'vue'
import VueRouter from 'vue-router'
import EmailAddresses from '../views/EmailAddresses.vue'
import EmailTemplates from '../views/EmailTemplates.vue'
import EmailTasks from '../views/EmailTasks.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/email-addresses'
  },
  {
    path: '/email-addresses',
    name: 'EmailAddresses',
    component: EmailAddresses
  },
  {
    path: '/email-templates',
    name: 'EmailTemplates',
    component: EmailTemplates
  },
  {
    path: '/email-tasks',
    name: 'EmailTasks',
    component: EmailTasks
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
